<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<div id="headnav">
	<style>
    .li_fontsize{
        font-size: 14px;
        color:white;
    }
	</style>
	<!--首页头部-->
	<div class="head head_white">
		<div class="head_box">
			<a href="http://www.huway.com/">
			<div class="logo">
				<img src="../images/brand.jpg" alt=""><!-- 首页logo -->
			</div>
			</a>
			<div class="menu">
				<ul>
					<li class="li_fontsize">
					<a class="select_arrow" href="index.jsp">论坛<i></i></a>
					</li>
					<li class="li_fontsize">
					<a href="PostAction_getPageResult.action?pagenum=1&topicId=2">线路活动</a>
					</li>
					<li class="li_fontsize">
					<a href="index.jsp">资讯</a>
					</li>
					<li class="li_fontsize">
					<a target="_blank" href="http://www.4008000000.com/zaixiangoumai/baoxian/lvyoubaoxian.shtml">户外保险</a>
					</li>
				</ul>
			</div>
			<div class="user">
				<ul>
					<li>
						<div class="navSearch float_R">
			        		<input type="text" placeholder="搜索" id="title">
			                <a href="javascript:void(0)" class="searchIcon" onclick="searchPost()">
			                    <img src="../images/searchIcon.png" alt="" style="height: 21px">
			                </a><!-- 搜索图标 -->
			        		<!-- <input type="submit" value=""> -->
			        	</div><!-- 首页搜索栏 -->
					</li>
					<c:if test="${user==null }">
						<li>
						<%-- 用户未登陆 --%>
						<a href="javascript:void(0)" id="login_a" onclick="toLogin()">登录</a>&nbsp;&nbsp;
						<a href="javascript:void(0)" id="regist_a" onclick="toReg()">注册</a>
					</li>
					</c:if>
					<c:if test="${user!=null }">
					<li>
						<%-- 用户已经登录 begin --%>
				        <div class="user_login" >
				            <div class="click_in"></div>
				
				            <div class="user_profile">
				                <a href="personinfo.jsp"><span><img src="${session.user.headImg }"></span><i></i></a>
				                <div class="select_box">
				                    <!-- <h4>个人中心</h4> -->
				                    <dl class="user_info">
				                        <dd><a href="personinfo.jsp">个人资料</a></dd>
				                        <dd><a href="PostAction_personPost.action">我的发帖</a></dd>
				                        <dd><a href="ReplyAction_personReply.action">我的回复</a></dd>       
				                        <dd><a href="UserAction_personCollect.action">我的收藏</a></dd>
				                        <dd><a href="UserAction_personFocus.action">我的关注</a></dd>
				            			<dd><a href="UserAction_getPersonHome.action?uid=${session.user.id }">我的主页</a></dd>
				                    </dl>
				                    <br/>      
				                </div>
				
				            </div>
				            <div class="click_in">
				                <a href="javascript:void(0)" onclick="toLogoff()">退出</a>
				            </div>           
				        </div>
				        <%-- 用户已经登录 end --%>
					</li>
					</c:if>
				</ul>
			</div>
		</div>
	</div>
</div>

<script type="text/javascript">
	function searchPost(){
		var title = jQuery("#title").val();
		location.href = "PostAction_getSearchPost.action?title="+title;
	}

    jQuery(document).ready(function(){
        /*头部添加白色背景
         $(".head").hover(function(){
         $(this).addClass("head_white");
         },function(){
         $(this).removeClass("head_white");
         });
         */
        /*头部下拉效果*/
        jQuery(".hider").hover(function(){
            jQuery(this).addClass("select");
        },function(){
            jQuery(this).removeClass("select");
        });
        jQuery(".user_news").hover(function(){
            jQuery(this).addClass("news_show");
        },function(){
            jQuery(this).removeClass("news_show");
        });
        jQuery(".user_profile").hover(function(){
            jQuery(this).addClass("profile_show");
        },function(){
            jQuery(this).removeClass("profile_show");
        });
    });
		
</script>

<%--
<!-- 搜索筛选 -->
<ul id="scbar_type_menu" class="p_pop" style="display: none;">
</ul>
<script type="text/javascript">
    initSearchmenu('scbar', '');
</script>
<!-- 用户菜单 -->
<ul class="sub_menu" id="m_menu" style="display: none;">
	<li style="display: none;"><a href="http://www.huway.com/home.php?mod=magic" style="background-image:url(http://bbs.huway.com/static/image/feed/magic_b.png) !important">道具</a></li>
	<li style="display: none;"><a href="http://www.huway.com/home.php?mod=medal" style="background-image:url(http://bbs.huway.com/static/image/feed/medal_b.png) !important">勋章</a></li>
	<li style="display: none;"><a href="http://www.huway.com/home.php?mod=task" style="background-image:url(http://bbs.huway.com/static/image/feed/task_b.png) !important">任务</a></li>
	<li><a href="http://www.huway.com/home.php?mod=spacecp">设置</a></li>
	<li><a href="http://www.huway.com/home.php?mod=space&do=favorite&view=me">我的收藏</a></li>
	<li></li>
	<li></li>
	<li></li>
	<li></li>
	<li><a href="http://bbs.huway.com/member.php?mod=logging&action=logout&formhash=72de664a">退出</a></li>
</ul>
<ul class="sub_menu" id="l_menu" style="display: none;">
	<!-- 第三方登录 -->
	<li class="user_list app_login"><a href="http://bbs.huway.com/connect.php?mod=login&op=init&referer=forum.php&statfrom=login"><i class="i_qq"></i>腾讯QQ</a></li>
	<li class="user_list app_login"><a href="http://bbs.huway.com/wechat/login.html"><i class="i_wb"></i>微信登录</a></li>
</ul>
--%>